<?php

/**
 * This is the model metadata class for table "provider_info".
 */
class ProviderInfoMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'provider_info';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('provider_type, gender', 'numerical', 'integerOnly'=>true),
			array('realName, nickname, post, department', 'length', 'max'=>15),
			array('tel, fax', 'length', 'max'=>20),
			array('mobile', 'length', 'max'=>11),
			array('address', 'length', 'max'=>255),
			array('zipcode', 'length', 'max'=>10),
			array('email, website, msn', 'length', 'max'=>50),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, provider_type, realName, nickname, gender, post, department, tel, fax, mobile, address, zipcode, email, website, msn', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => '供应商id',
			'provider_type' => '供货商类型',
			'realName' => '真实姓名',
			'nickname' => '昵称',
			'gender' => '性别',
			'post' => '职务',
			'department' => '所在部门',
			'tel' => '常用固定电话',
			'fax' => '传真',
			'mobile' => '手机',
			'address' => '常用通讯地址',
			'zipcode' => '邮编',
			'email' => '电子邮件',
			'website' => '网址',
			'msn' => '微软msn',
		);
	}
}